package rowingmanager.domain
class User {

String name
String surname
Date birthday
String phone
String email
Image avatar
Address address
Address secondAddress
boolean sex //true = male , false = female
String password

static hasMany = [identifications:Identification,addresses:Address]
static belongsTo = [organization:Organization]


static constraints = {
    name(nullable:true,maxSize:40)
    surname(nullable:true,maxSize:40)
    birthday(nullable:true)
    email(unique:true,nullable:false,email:true,blank:false,maxSize:50)
    phone(nullable:true,maxSize:25)
    sex(nullable:true)
    password(nullable:false,blank:false,maxSize:50)
    avatar(nullable:true)
    address(nullable:true)
    secondAddress(nullable:true)
   }

    

}
